package day06;

import sun.plugin2.message.GetAppletMessage;

public class PackageTest {
    public static void main(String[] args) {
        int[]arr={23,36,74,84,2,4};
        int max = getMaxOfArray(arr);
        System.out.println(max);
        int[] as =new int[10];
        for (int i = 0 ;i<as.length; i ++ ){
            as[i]=(int) (Math.random()*100);
        }
        int m = getMaxOfArray(as);
        System.out.println(m);
    }
    public static int getMaxOfArray(int[]arr){
        int max =arr[0];
        for (int i = 0 ; i<arr.length; i ++){
            if (arr[i]>max){
                max=arr[i];


            }

        }
        return max;
    }




}
